﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace Yunwei.Web.Areas.Admin.Models
{
    public class RestaurantViewModel
    {
        public int Id { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(20, MinimumLength = 4, ErrorMessage = "{2}到{1}个字符")]
        [Display(Name = "用户名")]
        public string Name { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(200, MinimumLength = 5, ErrorMessage = "{2}到{1}个字符")]
        [Display(Name = "门头照片")]
        public string Avatar { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(20, MinimumLength = 2, ErrorMessage = "{2}到{1}个字符")]
        [Display(Name = "负责人")]
        public string Contact { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(20, MinimumLength = 8, ErrorMessage = "{2}到{1}个字符")]
        [Display(Name = "电话")]
        public string Phone { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(200, MinimumLength = 4, ErrorMessage = "{2}到{1}个字符")]
        [Display(Name = "地址")]
        public string Address { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "经度")]
        public decimal X { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "纬度")]
        public decimal Y { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(20, MinimumLength = 2, ErrorMessage = "{2}到{1}个字符")]
        [Display(Name = "简介")]
        public string Brief { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "详述")]
        public string Description { get; set; }
    }
}